package jp.ddo.trismegistos.framework.util;

import java.util.Calendar;
import java.util.Date;

public class DateUtil {

	public static Date getNow() {
		return new Date();
	}

	public static java.sql.Date convertSqlDate(final Date nowDate) {
		final Calendar cal = Calendar.getInstance();
		cal.setTime(nowDate);
		cal.set(Calendar.HOUR_OF_DAY, 0);
		cal.set(Calendar.MINUTE, 0);
		cal.set(Calendar.SECOND, 0);
		cal.set(Calendar.MILLISECOND, 0);

		return new java.sql.Date(cal.getTimeInMillis());
	}

}
